﻿using sql_data_generator.FieldOptions;
using sql_data_generator.Generators;
using sql_data_generator.TextData;

namespace sql_data_generator.Randomizers
{
    class RandomizerCountry : BaseRandomizer<FieldOptionsCountry>, IRandomizer
    {
        private readonly RandomStringFromListGenerator _generator;

        public RandomizerCountry(FieldOptionsCountry options): base(options)
        {
            _generator = new RandomStringFromListGenerator(Texts.Instance.CountryNames);
        }

        public object GetData()
        {
            return IsNull() ? null : _generator.Generate();
        }
    }
}